package com.xuanwu.ai.flow._enum;


public enum CmpTypeEnum {

    NORMAL_COMPONENT("NodeComponent", "normal"),

    IF_COMPONENT("NodeIfComponent", "if"),

    SWITCH_COMPONENT("NodeSwitchComponent","switch"),

    FOR_COMPONENT("NodeForComponent","for");



    private String className;

    private String type;

    CmpTypeEnum(String className, String type) {
        this.className = className;
        this.type = type;
    }

    public String getClassName() {
        return className;
    }

    public String getType() {
        return type;
    }

    static public String getCmpType(String className){
        for(CmpTypeEnum cmpTypeEnum : CmpTypeEnum.values()){
            if(cmpTypeEnum.getClassName().equals(className))
                return cmpTypeEnum.getType();
        }
        return null;
    }
}
